<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .wrap{
            width: 100%;
            display: flex;
            /* flex-wrap: wrap; */
        }
        .box{
            width: 200px;
            height: 100px;
            margin-left: 20px;
        }
        .box{
            background-color: #ff6799;
        }
        .box:first-child{
            background-color: red;
        }
        .box:last-child{
            background-color: #bfa;
        }
        .box:nth-child(2){
            background-color: blue;
        }
        /* @media screen and (max-width: 768px){
            html{
                width: 768px;
                background-color: #eee;
            }
            .box4{
                display: none;
            }
        } */
        /* @media screen and (max-width: 1000px){
            html{
                width: 1000px;
                background-color: #000;
            }
        } */
    </style>
</head>
<body>
<!-- 实现屏幕宽小于768，显示3个block，否则显示4个 -->
    <div class="wrap">
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box box4"></div>
    </div>
</body>
<script>

</script>
</html>